import axiosInstance from "./ajax"
import type { ResDataType } from "./ajax"

type SearchOption = {
    recordScreenId: string
}

// 获取录屏数据
export async function getRecordScreenService(params: Partial<SearchOption> = {}): Promise<ResDataType> {
    const url = `/record-screen/getRecordScreenId`
    try {
        const data = (await axiosInstance.get(url, { params })) as ResDataType
        return data
    } catch (error) {
        console.error("Error fetching data:", error)
        throw error // 或者返回一个默认值，例如 { success: false, data: null }
    }
}
